package com.harmonk.firstscene.db.repository

import com.harmonk.firstscene.db.dao.QuickNoteDao
import com.harmonk.firstscene.db.entity.QuickNote
import kotlinx.coroutines.flow.Flow

class QuickNoteRepository(private val quickNoteDao: QuickNoteDao) {
    
    fun getAllQuickNotes(): Flow<List<QuickNote>> = quickNoteDao.getAllQuickNotes()
    
    suspend fun getQuickNoteById(id: Long): QuickNote? = quickNoteDao.getQuickNoteById(id)
    
    suspend fun insertQuickNote(quickNote: QuickNote): Long = quickNoteDao.insertQuickNote(quickNote)
    
    suspend fun updateQuickNote(quickNote: QuickNote) = quickNoteDao.updateQuickNote(quickNote)
    
    suspend fun deleteQuickNote(quickNote: QuickNote) = quickNoteDao.deleteQuickNote(quickNote)
}